home *** CD-ROM | disk | FTP | other *** search
Text File | 1998-08-17 | 17.0 KB | 637 lines | [TEXT/MPS ] |
- ;
- ; File: Resources.a
- ;
- ; Contains: Resource Manager Interfaces.
- ;
- ; Version: Technology: Mac OS 8.1
- ; Release: Universal Interfaces 3.2
- ;
- ; Copyright: © 1985-1998 by Apple Computer, Inc., all rights reserved
- ;
- ; Bugs?: For bug reports, consult the following page on
- ; the World Wide Web:
- ;
- ; http://developer.apple.com/bugreporter/
- ;
- ;
- IF &TYPE('__RESOURCES__') = 'UNDEFINED' THEN
- __RESOURCES__ SET 1
-
- IF &TYPE('__MACTYPES__') = 'UNDEFINED' THEN
- include 'MacTypes.a'
- ENDIF
- IF &TYPE('__MIXEDMODE__') = 'UNDEFINED' THEN
- include 'MixedMode.a'
- ENDIF
- IF &TYPE('__FILES__') = 'UNDEFINED' THEN
- include 'Files.a'
- ENDIF
-
-
-
- resSysHeap EQU 64 ;System or application heap?
- resPurgeable EQU 32 ;Purgeable resource?
- resLocked EQU 16 ;Load it in locked?
- resProtected EQU 8 ;Protected?
- resPreload EQU 4 ;Load in on OpenResFile?
- resChanged EQU 2 ;Resource changed?
- mapReadOnly EQU 128 ;Resource file read-only
- mapCompact EQU 64 ;Compact resource file
- mapChanged EQU 32 ;Write map out at update
-
- resSysRefBit EQU 7 ;reference to system/local reference
- resSysHeapBit EQU 6 ;In system/in application heap
- resPurgeableBit EQU 5 ;Purgeable/not purgeable
- resLockedBit EQU 4 ;Locked/not locked
- resProtectedBit EQU 3 ;Protected/not protected
- resPreloadBit EQU 2 ;Read in at OpenResource?
- resChangedBit EQU 1 ;Existing resource changed since last update
- mapReadOnlyBit EQU 7 ;is this file read-only?
- mapCompactBit EQU 6 ;Is a compact necessary?
- mapChangedBit EQU 5 ;Is it necessary to write map?
-
- kResFileNotOpened EQU -1 ;ref num return as error when opening a resource file
- kSystemResFile EQU 0 ;this is the default ref num to the system file
-
- IF ¬ TARGET_OS_MAC THEN
- ; QuickTime 3.0
- ENDIF
- ;
- ; pascal short InitResources(void )
- ;
- IF TARGET_OS_MAC ** TARGET_CPU_68K ** ¬ TARGET_RT_MAC_CFM THEN
- _InitResources: OPWORD $A995
- ELSEIF TARGET_OS_MAC ** TARGET_RT_MAC_CFM THEN
- IMPORT_CFM_FUNCTION InitResources
- ENDIF
-
- ;
- ; pascal void RsrcZoneInit(void )
- ;
- IF TARGET_OS_MAC ** TARGET_CPU_68K ** ¬ TARGET_RT_MAC_CFM THEN
- _RsrcZoneInit: OPWORD $A996
- ELSEIF TARGET_OS_MAC ** TARGET_RT_MAC_CFM THEN
- IMPORT_CFM_FUNCTION RsrcZoneInit
- ENDIF
-
- ;
- ; pascal void CloseResFile(short refNum)
- ;
- IF TARGET_OS_MAC ** TARGET_CPU_68K ** ¬ TARGET_RT_MAC_CFM THEN
- _CloseResFile: OPWORD $A99A
- ELSEIF TARGET_OS_MAC ** TARGET_RT_MAC_CFM THEN
- IMPORT_CFM_FUNCTION CloseResFile
- ENDIF
-
- ;
- ; pascal OSErr ResError(void )
- ;
- IF TARGET_OS_MAC ** TARGET_CPU_68K ** ¬ TARGET_RT_MAC_CFM THEN
- _ResError: OPWORD $A9AF
- ELSEIF TARGET_OS_MAC ** TARGET_RT_MAC_CFM THEN
- IMPORT_CFM_FUNCTION ResError
- ENDIF
-
- ;
- ; pascal short CurResFile(void )
- ;
- IF TARGET_OS_MAC ** TARGET_CPU_68K ** ¬ TARGET_RT_MAC_CFM THEN
- _CurResFile: OPWORD $A994
- ELSEIF TARGET_OS_MAC ** TARGET_RT_MAC_CFM THEN
- IMPORT_CFM_FUNCTION CurResFile
- ENDIF
-
- ;
- ; pascal short HomeResFile(Handle theResource)
- ;
- IF TARGET_OS_MAC ** TARGET_CPU_68K ** ¬ TARGET_RT_MAC_CFM THEN
- _HomeResFile: OPWORD $A9A4
- ELSEIF TARGET_OS_MAC ** TARGET_RT_MAC_CFM THEN
- IMPORT_CFM_FUNCTION HomeResFile
- ENDIF
-
- ;
- ; pascal void CreateResFile(ConstStr255Param fileName)
- ;
- IF TARGET_OS_MAC ** TARGET_CPU_68K ** ¬ TARGET_RT_MAC_CFM THEN
- _CreateResFile: OPWORD $A9B1
- ELSEIF TARGET_OS_MAC ** TARGET_RT_MAC_CFM THEN
- IMPORT_CFM_FUNCTION CreateResFile
- ENDIF
-
- ;
- ; pascal short OpenResFile(ConstStr255Param fileName)
- ;
- IF TARGET_OS_MAC ** TARGET_CPU_68K ** ¬ TARGET_RT_MAC_CFM THEN
- _OpenResFile: OPWORD $A997
- ELSEIF TARGET_OS_MAC ** TARGET_RT_MAC_CFM THEN
- IMPORT_CFM_FUNCTION OpenResFile
- ENDIF
-
- ;
- ; pascal void UseResFile(short refNum)
- ;
- IF TARGET_OS_MAC ** TARGET_CPU_68K ** ¬ TARGET_RT_MAC_CFM THEN
- _UseResFile: OPWORD $A998
- ELSEIF TARGET_OS_MAC ** TARGET_RT_MAC_CFM THEN
- IMPORT_CFM_FUNCTION UseResFile
- ENDIF
-
- ;
- ; pascal short CountTypes(void )
- ;
- IF TARGET_OS_MAC ** TARGET_CPU_68K ** ¬ TARGET_RT_MAC_CFM THEN
- _CountTypes: OPWORD $A99E
- ELSEIF TARGET_OS_MAC ** TARGET_RT_MAC_CFM THEN
- IMPORT_CFM_FUNCTION CountTypes
- ENDIF
-
- ;
- ; pascal short Count1Types(void )
- ;
- IF TARGET_OS_MAC ** TARGET_CPU_68K ** ¬ TARGET_RT_MAC_CFM THEN
- _Count1Types: OPWORD $A81C
- ELSEIF TARGET_OS_MAC ** TARGET_RT_MAC_CFM THEN
- IMPORT_CFM_FUNCTION Count1Types
- ENDIF
-
- ;
- ; pascal void GetIndType(ResType *theType, short index)
- ;
- IF TARGET_OS_MAC ** TARGET_CPU_68K ** ¬ TARGET_RT_MAC_CFM THEN
- _GetIndType: OPWORD $A99F
- ELSEIF TARGET_OS_MAC ** TARGET_RT_MAC_CFM THEN
- IMPORT_CFM_FUNCTION GetIndType
- ENDIF
-
- ;
- ; pascal void Get1IndType(ResType *theType, short index)
- ;
- IF TARGET_OS_MAC ** TARGET_CPU_68K ** ¬ TARGET_RT_MAC_CFM THEN
- _Get1IndType: OPWORD $A80F
- ELSEIF TARGET_OS_MAC ** TARGET_RT_MAC_CFM THEN
- IMPORT_CFM_FUNCTION Get1IndType
- ENDIF
-
- ;
- ; pascal void SetResLoad(Boolean load)
- ;
- IF TARGET_OS_MAC ** TARGET_CPU_68K ** ¬ TARGET_RT_MAC_CFM THEN
- _SetResLoad: OPWORD $A99B
- ELSEIF TARGET_OS_MAC ** TARGET_RT_MAC_CFM THEN
- IMPORT_CFM_FUNCTION SetResLoad
- ENDIF
-
- ;
- ; pascal short CountResources(ResType theType)
- ;
- IF TARGET_OS_MAC ** TARGET_CPU_68K ** ¬ TARGET_RT_MAC_CFM THEN
- _CountResources: OPWORD $A99C
- ELSEIF TARGET_OS_MAC ** TARGET_RT_MAC_CFM THEN
- IMPORT_CFM_FUNCTION CountResources
- ENDIF
-
- ;
- ; pascal short Count1Resources(ResType theType)
- ;
- IF TARGET_OS_MAC ** TARGET_CPU_68K ** ¬ TARGET_RT_MAC_CFM THEN
- _Count1Resources: OPWORD $A80D
- ELSEIF TARGET_OS_MAC ** TARGET_RT_MAC_CFM THEN
- IMPORT_CFM_FUNCTION Count1Resources
- ENDIF
-
- ;
- ; pascal Handle GetIndResource(ResType theType, short index)
- ;
- IF TARGET_OS_MAC ** TARGET_CPU_68K ** ¬ TARGET_RT_MAC_CFM THEN
- _GetIndResource: OPWORD $A99D
- ELSEIF TARGET_OS_MAC ** TARGET_RT_MAC_CFM THEN
- IMPORT_CFM_FUNCTION GetIndResource
- ENDIF
-
- ;
- ; pascal Handle Get1IndResource(ResType theType, short index)
- ;
- IF TARGET_OS_MAC ** TARGET_CPU_68K ** ¬ TARGET_RT_MAC_CFM THEN
- _Get1IndResource: OPWORD $A80E
- ELSEIF TARGET_OS_MAC ** TARGET_RT_MAC_CFM THEN
- IMPORT_CFM_FUNCTION Get1IndResource
- ENDIF
-
- ;
- ; pascal Handle GetResource(ResType theType, short theID)
- ;
- IF TARGET_OS_MAC ** TARGET_CPU_68K ** ¬ TARGET_RT_MAC_CFM THEN
- _GetResource: OPWORD $A9A0
- ELSEIF TARGET_OS_MAC ** TARGET_RT_MAC_CFM THEN
- IMPORT_CFM_FUNCTION GetResource
- ENDIF
-
- ;
- ; pascal Handle Get1Resource(ResType theType, short theID)
- ;
- IF TARGET_OS_MAC ** TARGET_CPU_68K ** ¬ TARGET_RT_MAC_CFM THEN
- _Get1Resource: OPWORD $A81F
- ELSEIF TARGET_OS_MAC ** TARGET_RT_MAC_CFM THEN
- IMPORT_CFM_FUNCTION Get1Resource
- ENDIF
-
- ;
- ; pascal Handle GetNamedResource(ResType theType, ConstStr255Param name)
- ;
- IF TARGET_OS_MAC ** TARGET_CPU_68K ** ¬ TARGET_RT_MAC_CFM THEN
- _GetNamedResource: OPWORD $A9A1
- ELSEIF TARGET_OS_MAC ** TARGET_RT_MAC_CFM THEN
- IMPORT_CFM_FUNCTION GetNamedResource
- ENDIF
-
- ;
- ; pascal Handle Get1NamedResource(ResType theType, ConstStr255Param name)
- ;
- IF TARGET_OS_MAC ** TARGET_CPU_68K ** ¬ TARGET_RT_MAC_CFM THEN
- _Get1NamedResource: OPWORD $A820
- ELSEIF TARGET_OS_MAC ** TARGET_RT_MAC_CFM THEN
- IMPORT_CFM_FUNCTION Get1NamedResource
- ENDIF
-
- ;
- ; pascal void LoadResource(Handle theResource)
- ;
- IF TARGET_OS_MAC ** TARGET_CPU_68K ** ¬ TARGET_RT_MAC_CFM THEN
- _LoadResource: OPWORD $A9A2
- ELSEIF TARGET_OS_MAC ** TARGET_RT_MAC_CFM THEN
- IMPORT_CFM_FUNCTION LoadResource
- ENDIF
-
- ;
- ; pascal void ReleaseResource(Handle theResource)
- ;
- IF TARGET_OS_MAC ** TARGET_CPU_68K ** ¬ TARGET_RT_MAC_CFM THEN
- _ReleaseResource: OPWORD $A9A3
- ELSEIF TARGET_OS_MAC ** TARGET_RT_MAC_CFM THEN
- IMPORT_CFM_FUNCTION ReleaseResource
- ENDIF
-
- ;
- ; pascal void DetachResource(Handle theResource)
- ;
- IF TARGET_OS_MAC ** TARGET_CPU_68K ** ¬ TARGET_RT_MAC_CFM THEN
- _DetachResource: OPWORD $A992
- ELSEIF TARGET_OS_MAC ** TARGET_RT_MAC_CFM THEN
- IMPORT_CFM_FUNCTION DetachResource
- ENDIF
-
- ;
- ; pascal short UniqueID(ResType theType)
- ;
- IF TARGET_OS_MAC ** TARGET_CPU_68K ** ¬ TARGET_RT_MAC_CFM THEN
- _UniqueID: OPWORD $A9C1
- ELSEIF TARGET_OS_MAC ** TARGET_RT_MAC_CFM THEN
- IMPORT_CFM_FUNCTION UniqueID
- ENDIF
-
- ;
- ; pascal short Unique1ID(ResType theType)
- ;
- IF TARGET_OS_MAC ** TARGET_CPU_68K ** ¬ TARGET_RT_MAC_CFM THEN
- _Unique1ID: OPWORD $A810
- ELSEIF TARGET_OS_MAC ** TARGET_RT_MAC_CFM THEN
- IMPORT_CFM_FUNCTION Unique1ID
- ENDIF
-
- ;
- ; pascal short GetResAttrs(Handle theResource)
- ;
- IF TARGET_OS_MAC ** TARGET_CPU_68K ** ¬ TARGET_RT_MAC_CFM THEN
- _GetResAttrs: OPWORD $A9A6
- ELSEIF TARGET_OS_MAC ** TARGET_RT_MAC_CFM THEN
- IMPORT_CFM_FUNCTION GetResAttrs
- ENDIF
-
- ;
- ; pascal void GetResInfo(Handle theResource, short *theID, ResType *theType, Str255 name)
- ;
- IF TARGET_OS_MAC ** TARGET_CPU_68K ** ¬ TARGET_RT_MAC_CFM THEN
- _GetResInfo: OPWORD $A9A8
- ELSEIF TARGET_OS_MAC ** TARGET_RT_MAC_CFM THEN
- IMPORT_CFM_FUNCTION GetResInfo
- ENDIF
-
- ;
- ; pascal void SetResInfo(Handle theResource, short theID, ConstStr255Param name)
- ;
- IF TARGET_OS_MAC ** TARGET_CPU_68K ** ¬ TARGET_RT_MAC_CFM THEN
- _SetResInfo: OPWORD $A9A9
- ELSEIF TARGET_OS_MAC ** TARGET_RT_MAC_CFM THEN
- IMPORT_CFM_FUNCTION SetResInfo
- ENDIF
-
- ;
- ; pascal void AddResource(Handle theData, ResType theType, short theID, ConstStr255Param name)
- ;
- IF TARGET_OS_MAC ** TARGET_CPU_68K ** ¬ TARGET_RT_MAC_CFM THEN
- _AddResource: OPWORD $A9AB
- ELSEIF TARGET_OS_MAC ** TARGET_RT_MAC_CFM THEN
- IMPORT_CFM_FUNCTION AddResource
- ENDIF
-
- ;
- ; pascal long GetResourceSizeOnDisk(Handle theResource)
- ;
- IF TARGET_OS_MAC ** TARGET_CPU_68K ** ¬ TARGET_RT_MAC_CFM THEN
- _GetResourceSizeOnDisk: OPWORD $A9A5
- ELSEIF TARGET_OS_MAC ** TARGET_RT_MAC_CFM THEN
- IMPORT_CFM_FUNCTION GetResourceSizeOnDisk
- ENDIF
-
- ;
- ; pascal long GetMaxResourceSize(Handle theResource)
- ;
- IF TARGET_OS_MAC ** TARGET_CPU_68K ** ¬ TARGET_RT_MAC_CFM THEN
- _GetMaxResourceSize: OPWORD $A821
- ELSEIF TARGET_OS_MAC ** TARGET_RT_MAC_CFM THEN
- IMPORT_CFM_FUNCTION GetMaxResourceSize
- ENDIF
-
- ;
- ; pascal long RsrcMapEntry(Handle theResource)
- ;
- IF TARGET_OS_MAC ** TARGET_CPU_68K ** ¬ TARGET_RT_MAC_CFM THEN
- _RsrcMapEntry: OPWORD $A9C5
- ELSEIF TARGET_OS_MAC ** TARGET_RT_MAC_CFM THEN
- IMPORT_CFM_FUNCTION RsrcMapEntry
- ENDIF
-
- ;
- ; pascal void SetResAttrs(Handle theResource, short attrs)
- ;
- IF TARGET_OS_MAC ** TARGET_CPU_68K ** ¬ TARGET_RT_MAC_CFM THEN
- _SetResAttrs: OPWORD $A9A7
- ELSEIF TARGET_OS_MAC ** TARGET_RT_MAC_CFM THEN
- IMPORT_CFM_FUNCTION SetResAttrs
- ENDIF
-
- ;
- ; pascal void ChangedResource(Handle theResource)
- ;
- IF TARGET_OS_MAC ** TARGET_CPU_68K ** ¬ TARGET_RT_MAC_CFM THEN
- _ChangedResource: OPWORD $A9AA
- ELSEIF TARGET_OS_MAC ** TARGET_RT_MAC_CFM THEN
- IMPORT_CFM_FUNCTION ChangedResource
- ENDIF
-
- ;
- ; pascal void RemoveResource(Handle theResource)
- ;
- IF TARGET_OS_MAC ** TARGET_CPU_68K ** ¬ TARGET_RT_MAC_CFM THEN
- _RemoveResource: OPWORD $A9AD
- ELSEIF TARGET_OS_MAC ** TARGET_RT_MAC_CFM THEN
- IMPORT_CFM_FUNCTION RemoveResource
- ENDIF
-
- ;
- ; pascal void UpdateResFile(short refNum)
- ;
- IF TARGET_OS_MAC ** TARGET_CPU_68K ** ¬ TARGET_RT_MAC_CFM THEN
- _UpdateResFile: OPWORD $A999
- ELSEIF TARGET_OS_MAC ** TARGET_RT_MAC_CFM THEN
- IMPORT_CFM_FUNCTION UpdateResFile
- ENDIF
-
- ;
- ; pascal void WriteResource(Handle theResource)
- ;
- IF TARGET_OS_MAC ** TARGET_CPU_68K ** ¬ TARGET_RT_MAC_CFM THEN
- _WriteResource: OPWORD $A9B0
- ELSEIF TARGET_OS_MAC ** TARGET_RT_MAC_CFM THEN
- IMPORT_CFM_FUNCTION WriteResource
- ENDIF
-
- ;
- ; pascal void SetResPurge(Boolean install)
- ;
- IF TARGET_OS_MAC ** TARGET_CPU_68K ** ¬ TARGET_RT_MAC_CFM THEN
- _SetResPurge: OPWORD $A993
- ELSEIF TARGET_OS_MAC ** TARGET_RT_MAC_CFM THEN
- IMPORT_CFM_FUNCTION SetResPurge
- ENDIF
-
- ;
- ; pascal short GetResFileAttrs(short refNum)
- ;
- IF TARGET_OS_MAC ** TARGET_CPU_68K ** ¬ TARGET_RT_MAC_CFM THEN
- _GetResFileAttrs: OPWORD $A9F6
- ELSEIF TARGET_OS_MAC ** TARGET_RT_MAC_CFM THEN
- IMPORT_CFM_FUNCTION GetResFileAttrs
- ENDIF
-
- ;
- ; pascal void SetResFileAttrs(short refNum, short attrs)
- ;
- IF TARGET_OS_MAC ** TARGET_CPU_68K ** ¬ TARGET_RT_MAC_CFM THEN
- _SetResFileAttrs: OPWORD $A9F7
- ELSEIF TARGET_OS_MAC ** TARGET_RT_MAC_CFM THEN
- IMPORT_CFM_FUNCTION SetResFileAttrs
- ENDIF
-
- ;
- ; pascal short OpenRFPerm(ConstStr255Param fileName, short vRefNum, SInt8 permission)
- ;
- IF TARGET_OS_MAC ** TARGET_CPU_68K ** ¬ TARGET_RT_MAC_CFM THEN
- _OpenRFPerm: OPWORD $A9C4
- ELSEIF TARGET_OS_MAC ** TARGET_RT_MAC_CFM THEN
- IMPORT_CFM_FUNCTION OpenRFPerm
- ENDIF
-
- ;
- ; pascal Handle RGetResource(ResType theType, short theID)
- ;
- IF TARGET_OS_MAC ** TARGET_CPU_68K ** ¬ TARGET_RT_MAC_CFM THEN
- _RGetResource: OPWORD $A80C
- ELSEIF TARGET_OS_MAC ** TARGET_RT_MAC_CFM THEN
- IMPORT_CFM_FUNCTION RGetResource
- ENDIF
-
- ;
- ; Note: The HOpenResFile trap was not implemented until System 7. If you want to call HOpenResFile
- ; while running on System 6 machines, then define USE_HOPENRESFILE_GLUE and link with
- ; Interface.o which contains glue to implement HOpenResFile on pre-System 7 machines.
- ;
-
- IF &TYPE('USE_HOPENRESFILE_GLUE') <> 'UNDEFINED' THEN
- ;
- ; pascal short HOpenResFile(short vRefNum, long dirID, ConstStr255Param fileName, SInt8 permission)
- ;
- IF TARGET_OS_MAC ** TARGET_RT_MAC_CFM THEN
- IMPORT_CFM_FUNCTION HOpenResFile
- ENDIF
-
- ELSE
- ;
- ; pascal short HOpenResFile(short vRefNum, long dirID, ConstStr255Param fileName, SInt8 permission)
- ;
- IF TARGET_OS_MAC ** TARGET_CPU_68K ** ¬ TARGET_RT_MAC_CFM THEN
- _HOpenResFile: OPWORD $A81A
- ELSEIF TARGET_OS_MAC ** TARGET_RT_MAC_CFM THEN
- IMPORT_CFM_FUNCTION HOpenResFile
- ENDIF
-
- ENDIF
- ;
- ; Note: The HCreateResFile trap was not implemented until System 7. If you want to call HCreateResFile
- ; while running on System 6 machines, then define USE_HCREATERESFILE_GLUE and link with
- ; Interface.o which contains glue to implement HCreateResFile on pre-System 7 machines.
- ;
-
- IF &TYPE('USE_HCREATERESFILE_GLUE') <> 'UNDEFINED' THEN
- ;
- ; pascal void HCreateResFile(short vRefNum, long dirID, ConstStr255Param fileName)
- ;
- IF TARGET_OS_MAC ** TARGET_RT_MAC_CFM THEN
- IMPORT_CFM_FUNCTION HCreateResFile
- ENDIF
-
- ELSE
- ;
- ; pascal void HCreateResFile(short vRefNum, long dirID, ConstStr255Param fileName)
- ;
- IF TARGET_OS_MAC ** TARGET_CPU_68K ** ¬ TARGET_RT_MAC_CFM THEN
- _HCreateResFile: OPWORD $A81B
- ELSEIF TARGET_OS_MAC ** TARGET_RT_MAC_CFM THEN
- IMPORT_CFM_FUNCTION HCreateResFile
- ENDIF
-
- ENDIF
- ;
- ; pascal short FSpOpenResFile(const FSSpec *spec, SignedByte permission)
- ;
- IF TARGET_OS_MAC ** TARGET_CPU_68K ** ¬ TARGET_RT_MAC_CFM THEN
- Macro
- _FSpOpenResFile
- moveq #13,D0
- dc.w $AA52
- EndM
- ELSEIF TARGET_OS_MAC ** TARGET_RT_MAC_CFM THEN
- IMPORT_CFM_FUNCTION FSpOpenResFile
- ENDIF
-
- ;
- ; pascal void FSpCreateResFile(const FSSpec *spec, OSType creator, OSType fileType, ScriptCode scriptTag)
- ;
- IF TARGET_OS_MAC ** TARGET_CPU_68K ** ¬ TARGET_RT_MAC_CFM THEN
- Macro
- _FSpCreateResFile
- moveq #14,D0
- dc.w $AA52
- EndM
- ELSEIF TARGET_OS_MAC ** TARGET_RT_MAC_CFM THEN
- IMPORT_CFM_FUNCTION FSpCreateResFile
- ENDIF
-
- ;
- ; pascal void ReadPartialResource(Handle theResource, long offset, void *buffer, long count)
- ;
- IF TARGET_OS_MAC ** TARGET_CPU_68K ** ¬ TARGET_RT_MAC_CFM THEN
- Macro
- _ReadPartialResource
- moveq #1,D0
- dc.w $A822
- EndM
- ELSEIF TARGET_OS_MAC ** TARGET_RT_MAC_CFM THEN
- IMPORT_CFM_FUNCTION ReadPartialResource
- ENDIF
-
- ;
- ; pascal void WritePartialResource(Handle theResource, long offset, const void *buffer, long count)
- ;
- IF TARGET_OS_MAC ** TARGET_CPU_68K ** ¬ TARGET_RT_MAC_CFM THEN
- Macro
- _WritePartialResource
- moveq #2,D0
- dc.w $A822
- EndM
- ELSEIF TARGET_OS_MAC ** TARGET_RT_MAC_CFM THEN
- IMPORT_CFM_FUNCTION WritePartialResource
- ENDIF
-
- ;
- ; pascal void SetResourceSize(Handle theResource, long newSize)
- ;
- IF TARGET_OS_MAC ** TARGET_CPU_68K ** ¬ TARGET_RT_MAC_CFM THEN
- Macro
- _SetResourceSize
- moveq #3,D0
- dc.w $A822
- EndM
- ELSEIF TARGET_OS_MAC ** TARGET_RT_MAC_CFM THEN
- IMPORT_CFM_FUNCTION SetResourceSize
- ENDIF
-
- ;
- ; pascal Handle GetNextFOND(Handle fondHandle)
- ;
- IF TARGET_OS_MAC ** TARGET_CPU_68K ** ¬ TARGET_RT_MAC_CFM THEN
- Macro
- _GetNextFOND
- moveq #10,D0
- dc.w $A822
- EndM
- ELSEIF TARGET_OS_MAC ** TARGET_RT_MAC_CFM THEN
- IMPORT_CFM_FUNCTION GetNextFOND
- ENDIF
-
-
- IF ¬ TARGET_OS_MAC THEN
- ; QuickTime 3.0
- ;
- ; extern OSErr RegisterResourceEndianFilter(ResType theType, ResourceEndianFilterPtr theFilterProc)
- ;
- IF TARGET_OS_MAC ** TARGET_RT_MAC_CFM THEN
- IMPORT_CFM_FUNCTION RegisterResourceEndianFilter
- ENDIF
-
- ENDIF
- ; Use TempInsertROMMap to force the ROM resource map to be
- ; inserted into the chain in front of the system. Note that
- ; this call is only temporary - the modified resource chain
- ; is only used for the next call to the resource manager.
- ; See IM IV 19 for more information.
- ;
-
- ;
- ; pascal void TempInsertROMMap(Boolean tempResLoad)
- ;
- IF TARGET_OS_MAC ** TARGET_CPU_68K ** ¬ TARGET_RT_MAC_CFM THEN
- Macro
- _TempInsertROMMap
- moveq #-1,D0
- dc.w $4A1F
- dc.w $56C0
- dc.w $31C0
- dc.w $0B9E
- EndM
- ELSEIF TARGET_OS_MAC ** TARGET_RT_MAC_CFM THEN
- IMPORT_CFM_FUNCTION TempInsertROMMap
- ENDIF
-
-
- IF OLDROUTINENAMES THEN
-
- ENDIF ; OLDROUTINENAMES
- ;
- ; These typedefs were originally created for the Copland Resource Mangager
- ;
-
- ; typedef short ResFileRefNum
-
- ; typedef short ResID
-
- ; typedef short ResAttributes
-
- ; typedef short ResFileAttributes
-
-
-
- ENDIF ; __RESOURCES__
-
-